<?php
	//prevents access to page from other host
	if (isset ($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {
		$referer = parse_url($_SERVER['HTTP_REFERER']);
		if ($_SERVER['HTTP_HOST'] !== $referer['host']) {
			die('Access not allowed');
		}
	}
?>